package com.common;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;

import com.base.core.head.utils.DataDictionaryUtils;
import com.base.service.base.system.service.ConfigureService;

import jakarta.annotation.Resource;

/**
 * 开启服务
 * @author start
 */
@MapperScan("com.companyname.projecttemplate.**.mapper.**")
//@EnableFeignClients(basePackages = {"com.common.mapping.ws"})
@SpringBootApplication
@ComponentScan(basePackages = {
		"com.base.common.web.controller",
		"com.base.common.aop.configure",
		"com.base.common.druid",
		"com.common.core",
		"com.companyname"})
public class RunProjectTemplateAdmin implements CommandLineRunner {

    public static void main(String[] args) {
		SpringApplication.run(RunProjectTemplateAdmin.class, args);
    }
    
    @Resource
    private ConfigureService configureService;
    
	@Override
	public void run(String... args) throws Exception {
		DataDictionaryUtils.init(configureService.initDataDictionary(1));
	}

}
